package com.yidu.view;

import com.yidu.dao.BookUserMapper;
import com.yidu.domain.BookUser;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * <p>@Description: No Description</p>
 * <p>@Author yidu-liandyao</p>
 * <p>@Date: 2021-01-05</p>
 * <p>@Time: 15:17</p>
 */
public class BootUserTest2 {

    @Test
    public void selectAll(){
        SqlSession session = SqlSessionTools.getSession();
        BookUserMapper mapper = session.getMapper(BookUserMapper.class);
        List<BookUser> list = mapper.selectAll();
        for(BookUser user:list){
            System.out.println(user.getUserName());
        }
    }

    @Test
    public void selectAll2(){
        SqlSession session = SqlSessionTools.getSession();
        BookUserMapper mapper = session.getMapper(BookUserMapper.class);
        List<BookUser> list = mapper.selectAll2();
        for(BookUser user:list){
            System.out.println(user.getUserName());
        }
    }
}
